<template>
  <div class="about" style="background: #f2f2f2; height: 700px">
    <!-- 顶部 -->
    <div class="header">
      <span><img src="../../public/img/return.png" alt="" /></span>
      <span>商品分类</span>
      <hr style="width: 93%; margin: auto" />
    </div>
    <!--搜索 -->
    <div style="" class="bgc">
      <p>
        <i class="iconfont iconsousuo"></i
        ><input type="text" class="search" placeholder="" /><span class="sousuo"
          >搜索</span
        >
      </p>
    </div>
    <!-- 4个分类 -->
    <div v-for="(item, index) in nav" :key="index" class="fenlei">
      <p title="item.title">{{ item.title }}<span>全部 ></span></p>
    </div>
  </div>
</template>

<style lang="less" scoped>
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
// 顶部
.header {
  background-color: #ffffff;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
  span {
    font-size: 16px;
    line-height: 43px;
    margin-left: -26px;
    overflow: hidden;
    img {
      width: 25px;
      float: left;
      margin: 7px 0 0 10px;
    }
  }
}
.bgc {
  background: url(../../public/img/bgc.jpg) no-repeat;
  margin-top: 43px;
  text-align: center;
  background-position: -30px -30px;
  padding: 20px 0 20px;
  margin-bottom: -10px;
}
.search {
  width: 90%;
  height: 35px;
  line-height: 35px;
  border-radius: 40px;
  font-size: 16px;
  outline: none;
  padding-left: 40px;
  padding-right: 10px;
  border: 1px solid #ccc;
}
.iconsousuo {
  font-size: 22px;
  color: #6b2828;
  position: absolute;
  margin-left: 8px;
  margin-top: 2px;
}
.sousuo {
  font-size: 16px;
  color: #6b2828;
  position: absolute;
  margin-left: -55px;
  margin-top: 6px;
}
// 4个分类
.fenlei {
  width: 100%;
  height: 50px;
  line-height: 50px;
  padding: 0 10px;
  color: #6b2828;
  margin: 10px 0;
  font-size: 14px;
  background-color: #ffffff;
}
.fenlei span {
  float: right;
  color: #919191;
}
</style>

<script>
export default {
  data() {
    return {
      nav: [
        // 精选商品的数据
        { title: "新品上市" },
        { title: "精选商品" },
        { title: "新鲜直达" },
        { title: "礼品套装" },
      ],
    };
  },
};
</script>